package com.appspot.aliga;

public enum League {
	
	Bundesliga_1_2010(1, "1. Bundesliga", "bl1", "2010", 34),
	Bundesliga_2_2010(2, "2. Bundesliga", "bl2", "2010", 34),
	Bundesliga_3_2010(3, "3. Bundesliga", "bl3", "2010", 34);
	
	private String name;
	private String season;
	private int gameDays;
	private int id;
	private String oldbShortcut;

	private League(int id, String name, String oldbShortcut, String season, int gameDays){
		this.id = id;
		this.name = name;
		this.oldbShortcut = oldbShortcut;
		this.season = season;
		this.gameDays = gameDays;
	}
	
	public static League forID(int leagueID) {
		for (League league : League.values()) {
			if(league.getId() == leagueID)
				return league;
		}
		return null;
	}

	public String getName() {
		return name;
	}

	public String getSeason() {
		return season;
	}

	public int getGameDays() {
		return gameDays;
	}

	public int getId() {
		return id;
	}

	public String getOldbShortcut() {
		return oldbShortcut;
	}
	
	@Override
	public String toString() {
		return this.name;
	}
	
}
